import request from '../../utils/request';

// 文章点赞转发相关 API

// 批量获取文章统计信息
export const batchGetArticleStats = (data: any) => {
    return request({
        url: '/content/api/article-like-share/batch-stats',
        method: 'post',
        data
    });
};

// 点赞或转发文章
export const likeOrShareArticle = (data: any) => {
    return request({
        url: '/content/api/article-like-share/like-or-share',
        method: 'post',
        data
    });
};

// 获取文章统计信息
export const getArticleStats = (params: any) => {
    return request({
        url: '/content/api/article-like-share/stats',
        method: 'get',
        params
    });
};

// 取消点赞或转发
export const unlikeOrUnshareArticle = (data: any) => {
    return request({
        url: '/content/api/article-like-share/unlike-or-unshare',
        method: 'delete',
        data
    });
};

// 获取用户操作记录
export const getUserArticleActions = (params: any) => {
    return request({
        url: '/content/api/article-like-share/user-actions',
        method: 'get',
        params
    });
};
